1. Field of the Invention
The present invention relates to an image processing method and apparatus that read out an image data in a sub scanning direction stored in a buffer.
2. Description of the Related Art
An apparatus that performs a copy by controlling a scanner and a printer in an integrated fashion comprises an image processing unit that converts an image data read out by the scanner into an image data optimized for printing. The image processing unit comprises a buffer, which typically stores a plurality of lines of an image data to be processed, as a configuration element for performing an image process that references a pixel in a periphery, such as a filter process. As the size of the image data increases, however, a line size buffered also increases commensurately, and it has thus been necessary to remake the image processing unit whenever the size of the image data increases.
A method has accordingly been disclosed that segments the image data to be processed into a specified unit, or a band, in a sub scanning direction, performs a scan conversion, i.e., an H-V conversion, on a per band basis, and conveys the result thereof to the image processing unit at a subsequent stage; see, for example, U.S. Pat. No. 6,950,559. The method is referred to as a cross-band protocol. Employing the cross-band protocol allows employing a buffer of a limited size, which is not dependent upon the line size, in processing an image data of an arbitrary size.
Conversely, the image processing unit comprises an internal buffer for the scan conversion, the buffer being configured, with an eye toward cost and efficiency of data transfer, of a double buffer, with each of two buffers of a number of lines of a band multiplied by a unit of memory access.
A problem such as the following arises, however, when performing a scan conversion with the double buffer based on the unit of memory access.
For example, if a single pixel is stored in the memory without a break in 24 bits, with a 128-bit unit of memory access, a boundary of the memory access and a boundary of the pixel are by no means guaranteed to match, which may result in a pixel that overruns the buffer. Nor is a volume of data in a single line guaranteed to match the unit of memory access, which may result in a head of each respective line not lining up regularly with the head of each respective other line, making the scan conversion very difficult.
A similar problem arises as well with an image data stored in an RGB dot sequential format. FIG. 8 depicts a state of storing, in a buffer, an RGB dot sequential format image with a 48-bit pixel size, i.e., 16 bits each R, G, and B. As depicted in FIG. 8, the RGB dot sequential format image is stored in a buffer in a 256-bit unit of memory access as a band image segmented into a band with a height of 24 lines.
FIG. 9 depicts a storage state of a segment image A with a 256-bit width that is the unit of memory access depicted in FIG. 8. FIG. 10 depicts a storage state of a segment image B with a 256-bit width that is the unit of memory access depicted in FIG. 8. In the present example, the quantity of data of a single line is treated as being the unit of memory access, i.e., 256 bits, and a green data G00_05-G23_05 and a blue data B00_05-B23_05 in a column six are contained within a second buffer, as depicted in FIG. 10.
It is necessary, however, for the green data and the blue data to be processed together with a red data R00_05-R23_05 contained within a first buffer, as depicted in FIG. 9. It is thus necessary to maintain the red data within such as an internal register of a size equal to a number of inputted lines, when acquiring the data of the first buffer.
Thus, the problem when scan converting a dot sequential image is that it is necessary to a) manage either the color that the data of the head column in the buffer starts with, or the color that the data of the last column ends with, and b) maintain the pixel data that overruns the buffer.
Another problem is that it is necessary to configure and remake the dot sequential image into either a line sequential image or a frame sequential image, and to create a further wasteful increase in accessing and buffering thereof.